import {batchattrValidate,timeFn} from './batchattr-validate'
let tableValidate = {
  data(){
    let valueValidator = (rule,value,callback) => {
      if(value===''){
        return callback(new Error(this.$t('m.enter')))
      } else if(value<=0){
        return callback(new Error(this.$t('m.enter')+this.$t('m.check.number0')))
      }
      callback()
    }
    return {
      ruleTable:{
        value:[{ validator:valueValidator}],
        locationid:[{ required:true, message:this.$t('m.choose')+this.$t('m.page.location')}],
        ...batchattrValidate
      }
    }
  },
  methods:{
    ...timeFn
  }
}
export { tableValidate }